{%if $cm%}
<ul>
{%foreach from=$cm item='c'%}
<li id="comment_{%$c.id%}"{%if !$c.active%} class="inactive"{%/if%}>
   <div class="comments_meta">
      {%$TR->meccano->date%}: <span>{%$c.cdate|date_format:'%d.%m.%Y %H:%M'%}</span>
      {%$TR->meccano->author%}: <span>{%$c.user.name%}</span> ({%$c.user.type%})
      IP: <span>{%$c.ip%}</span>

      <a href="#" class="a_btn i_delete fl-right" onclick="deleteComment({%$c.id%}); return false;"></a>
      <a href="#" class="a_btn {%if $c.active%}i_on{%else%}i_off{%/if%} fl-right" onclick="switchCommentActiveState({%$c.id%}); return false;"></a>
   </div>
   <div class="comments_text">
      {%$c.comment%}
   </div>
   {%if $c.comments%}{%include file='servlet.comments.html' cm=$c.comments%}{%/if%}
</li>
{%/foreach%}
</ul>
{%/if%}